Developer --> Technical Publications
PATHHardware Documentation > USB Devices > Mac OS USB DDK API Reference


Major Features Introduced In Version 1.2

Beginning with version 1.2 of the Mac OS USB software, multiple class drivers can be merged into a single Mac OS extension file. This feature is beneficial in situations where you have several vendor specific devices in a product family, each device requiring slightly different driver functionality. Rather than creating a standalone native driver for each device, you can write driver code for each device and merge all the driver code into a single file. The single file will be loaded based on vendor and product specific ID information in favor of the Apple generic drivers, which guarantees proper support your family of devices.

The steps below define how to merge USB class drivers into a single file using CodeWarrior IDE 2.0 or greater. This discussion assumes familiarity with the Macintosh and CodeWarrior programming environments.

  1. Create each class driver into a Shared Library file of type 'shlb' , not 'ndrv' as you presently would for a standalone USB class driver.
  2. Set the CodeWarrior Target Setting with the linker popup to Mac OS Merge. Note that this target could be within the same project that creates the separate driver files to be merged.
  3. In the Mac OS Merge Panel under the Linker grouping, set the Project type popup menu to Shared Library, set the file name and set the file creator to 'usbd' , and file type to 'ndrv' . Ensure that the Copy Code Fragments option is checked. If there are resources associated with either of the drivers, then make sure that the Copy Resources option is checked.
  4. For this target, set the source files to be the shared library files which contain the drivers to be merged.


© 1999 Apple Computer, Inc.

Previous | Back Up One Level | Next | Show Frames | Hide Frames